/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.awt.Color;
/*     */ import java.awt.Point;
/*     */ import java.io.IOException;
/*     */ import java.util.ArrayList;
/*     */ import java.util.Arrays;
/*     */ import java.util.Collection;
/*     */ import java.util.HashMap;
/*     */ import java.util.List;
/*     */ import java.util.Locale;
/*     */ import java.util.Map;
/*     */ import java.util.Optional;
/*     */ import java.util.concurrent.ConcurrentHashMap;
/*     */ import java.util.concurrent.CopyOnWriteArrayList;
/*     */ import java.util.function.Function;
/*     */ import java.util.stream.Collectors;
/*     */ import net.minecraft.client.gui.Gui;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import org.lwjgl.opengl.GL11;
/*     */ import org.yaml.snakeyamla.configuration.ConfigurationSection;
/*     */ import org.yaml.snakeyamla.configuration.file.YamlConfiguration;
/*     */ 
/*     */ public abstract class pi
/*     */   extends Gui {
/*  26 */   public ConcurrentHashMap<String, String> na = new ConcurrentHashMap<>();
/*     */   
/*  28 */   public long ea = 1L;
/*     */ 
/*     */ 
/*     */   
/*     */   public long ka;
/*     */ 
/*     */ 
/*     */   
/*     */   public ConfigurationSection xa;
/*     */ 
/*     */ 
/*     */   
/*     */   public ConfigurationSection aa;
/*     */ 
/*     */ 
/*     */   
/*     */   public bh oa;
/*     */ 
/*     */ 
/*     */   
/*     */   public bh sa;
/*     */ 
/*     */ 
/*     */   
/*     */   public bh ua;
/*     */ 
/*     */ 
/*     */   
/*     */   public bh ia;
/*     */ 
/*     */ 
/*     */   
/*     */   public vh ta;
/*     */ 
/*     */ 
/*     */   
/*     */   public bh ha;
/*     */ 
/*     */ 
/*     */   
/*     */   public bh e;
/*     */ 
/*     */   
/*     */   public bh x;
/*     */ 
/*     */   
/*     */   public bh a;
/*     */ 
/*     */   
/*     */   public bh p;
/*     */ 
/*     */   
/*     */   public bh n;
/*     */ 
/*     */   
/*     */   public bh b;
/*     */ 
/*     */   
/*     */   public bh v;
/*     */ 
/*     */   
/*     */   public bh k;
/*     */ 
/*     */   
/*     */   public bh o;
/*     */ 
/*     */   
/*     */   public bh y;
/*     */ 
/*     */   
/*     */   public bh h;
/*     */ 
/*     */   
/*     */   public bh u;
/*     */ 
/*     */   
/*     */   public bh j;
/*     */ 
/*     */   
/*     */   public double c;
/*     */ 
/*     */   
/*     */   public double r;
/*     */ 
/*     */   
/*     */   public bh f;
/*     */ 
/*     */   
/*     */   public bh s;
/*     */ 
/*     */   
/*     */   public bh m;
/*     */ 
/*     */   
/*     */   public bh l;
/*     */ 
/*     */   
/*     */   public bh t;
/*     */ 
/*     */   
/*     */   public bh d;
/*     */ 
/*     */   
/*     */   public CopyOnWriteArrayList<bh> z;
/*     */ 
/*     */   
/*     */   public boolean i;
/*     */ 
/*     */   
/*     */   public boolean w;
/*     */ 
/*     */   
/*     */   public Map<String, bh> q;
/*     */ 
/*     */   
/*     */   public Map<Integer, Point> g;
/*     */ 
/*     */ 
/*     */   
/*     */   public ll createMoLangParserString(String str1, String str2) {
/* 148 */     return new ll(this.ta.parseExpression(readYmlAsString(str1, str2)), this);
/*     */   }
/*     */   
/*     */   public ll createMoLangParser(String str, Object object) {
/* 152 */     return new ll(this.ta.parseExpression(readYml(str, object)), this);
/*     */   }
/*     */   
/*     */   public ll toMolangParser(Object object) {
/* 156 */     return new ll(this.ta.parseExpression(object), this);
/*     */   }
/*     */   
/*     */   public ll toMolangParser(String str) {
/* 160 */     return new ll(this.ta.parseExpression(str), this);
/*     */   }
/*     */   
/*     */   public List<ll> createMoLangParserList(String str) {
/* 164 */     ConfigurationSection configurationSection = this.xa.contains(str) ? this.xa : this.aa;
/* 165 */     if (configurationSection.isList(str))
/* 166 */       return (List<ll>)configurationSection.getStringList(str).stream().map(this.ta::parseExpression)
/* 167 */         .map(bh1 -> new ll(bh1, this)).collect(Collectors.toList()); 
/* 168 */     if (configurationSection.isString(str)) {
/* 169 */       ll ll = createMoLangParserString(str, "");
/* 170 */       List<ll> list = new ArrayList();
/* 171 */       list.add(ll);
/* 172 */       return list;
/*     */     } 
/* 174 */     return new ArrayList<>();
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public Object readYml(String str, Object object) {
/* 180 */     return this.xa.get(str, this.aa.get(str, object));
/*     */   }
/*     */   
/*     */   public String readYmlAsString(String str1, String str2) {
/* 184 */     return this.xa.getString(str1, this.aa.getString(str1, str2));
/*     */   }
/*     */ 
/*     */   
/*     */   public void draw(int i, int j, boolean bool) {
/* 189 */     runAction("preRender");
/* 190 */     boolean bool1 = this.oa.v();
/* 191 */     if (!this.ta.p.contains(this) && this.i) {
/* 192 */       this.i = false;
/* 193 */       if (bool1) {
/* 194 */         runLeave(i, j);
/*     */       }
/*     */     } 
/*     */     
/* 198 */     if (this.sa.v()) {
/* 199 */       if (this.ta.p.contains(this) && !this.i) {
/* 200 */         this.i = true;
/* 201 */         if (bool1)
/* 202 */           runHover(i, j); 
/*     */       } 
/* 204 */       GlStateManager.func_179140_f();
/* 205 */       if (!(this instanceof hm)) {
/* 206 */         GlStateManager.func_179097_i();
/*     */       }
/*     */       
/* 209 */       GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
/*     */ 
/*     */       
/* 212 */       GlStateManager.func_179147_l();
/* 213 */       GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/* 214 */       GlStateManager.func_179118_c();
/*     */       
/* 216 */       preRender(i, j);
/* 217 */       render(i, j);
/* 218 */       if (bool) {
/* 219 */         renderDebug(i, j);
/*     */       }
/* 221 */       postRender(i, j);
/*     */       
/* 223 */       GlStateManager.func_179145_e();
/* 224 */       if (!(this instanceof hm)) {
/* 225 */         GlStateManager.func_179126_j();
/*     */       }
/* 227 */       GlStateManager.func_179084_k();
/*     */     } 
/* 229 */     runAction("postRender");
/*     */   }
/*     */ 
/*     */   
/*     */   public void renderDebug(int i, int j) {
/* 234 */     long l = System.nanoTime();
/* 235 */     boolean bool = isHovered(i, j);
/* 236 */     double d1 = this.p.v();
/* 237 */     double d2 = this.n.v();
/* 238 */     Color color = bool ? new Color(247, 49, 49, 255) : new Color(71, 145, 255, 255);
/*     */ 
/*     */     
/* 241 */     jo.v(0.0D, 0.0D, d1, d2, 1.0D, color);
/* 242 */     this.ka -= System.nanoTime() - l;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void preRender(int i, int j) {
/* 249 */     jo.v((float)this.ua.v());
/*     */ 
/*     */     
/* 252 */     if (this.ta.q <= 0 && this.g.containsKey(Integer.valueOf(0))) {
/* 253 */       this.c = (i - ((Point)this.g.get(Integer.valueOf(0))).x);
/* 254 */       this.r = (j - ((Point)this.g.get(Integer.valueOf(0))).y);
/*     */     } 
/* 256 */     this.c = sk.v(this.c, this.j.v(), this.h.v());
/* 257 */     this.r = sk.v(this.r, this.u.v(), this.y.v());
/*     */     
/* 259 */     GlStateManager.func_179094_E();
/*     */ 
/*     */     
/* 262 */     double d1 = this.k.v();
/* 263 */     double d2 = this.o.v();
/*     */     
/* 265 */     this.w = (d1 != 0.0D && d2 != 0.0D);
/* 266 */     if (this.w) {
/* 267 */       GL11.glEnable(3089);
/* 268 */       jo.v((int)getLimitXPos(), (int)getLimitYPos(), (int)d1, (int)d2);
/*     */     } 
/*     */ 
/*     */     
/* 272 */     GlStateManager.func_179137_b(
/* 273 */         Math.floor((getXPos() + this.t.v() + this.c) * 10.0D) / 10.0D, 
/* 274 */         Math.floor((getYPos() + this.d.v() + this.r) * 10.0D) / 10.0D, 0.0D);
/*     */ 
/*     */ 
/*     */ 
/*     */     
/* 279 */     double d3 = this.ia.v();
/* 280 */     GlStateManager.func_179139_a(d3, d3, 1.0D);
/*     */ 
/*     */     
/* 283 */     d3 = this.p.v();
/* 284 */     double d4 = this.n.v();
/*     */     
/* 286 */     GlStateManager.func_179137_b(d3 / 2.0D, d4 / 2.0D, 0.0D);
/* 287 */     double d5 = this.f.v();
/*     */     
/* 289 */     GlStateManager.func_179139_a(d5, d5, 1.0D);
/*     */     
/* 291 */     GlStateManager.func_179114_b((float)this.s.v(), 1.0F, 0.0F, 0.0F);
/* 292 */     GlStateManager.func_179114_b((float)this.m.v(), 0.0F, 1.0F, 0.0F);
/* 293 */     GlStateManager.func_179114_b((float)this.l.v(), 0.0F, 0.0F, 1.0F);
/*     */     
/* 295 */     GlStateManager.func_179137_b(-d3 / 2.0D, -d4 / 2.0D, 0.0D);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void postRender(int i, int j) {
/* 302 */     if (this.w) {
/* 303 */       GL11.glDisable(3089);
/*     */     }
/* 305 */     GlStateManager.func_179121_F();
/* 306 */     jo.v(1.0F);
/*     */   }
/*     */   
/*     */   public pi(vh vh1, ConfigurationSection configurationSection)
/*     */   {
/* 311 */     this.g = new HashMap<>(); this.ta = vh1; this.xa = configurationSection; this.aa = (ConfigurationSection)new YamlConfiguration(); Optional.<String>ofNullable(configurationSection.getString("extends")).ifPresent(str -> { if (vh1.getYaml().isConfigurationSection(str))
/*     */             this.aa = vh1.getYaml().getConfigurationSection(str);  }); this.ha = createMoLangParserString("position", ""); this.e = createMoLangParser("x", Integer.valueOf(0)); this.x = createMoLangParser("y", Integer.valueOf(0)); this.a = createMoLangParser("z", Integer.valueOf(0)); this.p = createMoLangParser("width", Integer.valueOf(0)); this.n = createMoLangParser("height", Integer.valueOf(0)); this.b = createMoLangParser("limitX", Integer.valueOf(0)); this.v = createMoLangParser("limitY", Integer.valueOf(0)); this.k = createMoLangParser("limitWidth", Integer.valueOf(0)); this.o = createMoLangParser("limitHeight", Integer.valueOf(0)); this.oa = createMoLangParser("enable", Boolean.valueOf(true)); this.sa = createMoLangParser("visible", Boolean.valueOf(true)); this.ua = createMoLangParser("alpha", Integer.valueOf(1)); this.ia = createMoLangParser("scale", Integer.valueOf(1)); this.y = createMoLangParser("maxDistanceY", Integer.valueOf(0)); this.h = createMoLangParser("maxDistanceX", Integer.valueOf(0)); this.u = createMoLangParser("minDistanceY", Integer.valueOf(0)); this.j = createMoLangParser("minDistanceX", Integer.valueOf(0)); this.c = createMoLangParser("distanceX", Integer.valueOf(0)).v(); this.r = createMoLangParser("distanceY", Integer.valueOf(0)).v(); this.f = createMoLangParser("fscale", Integer.valueOf(1)); this.s = createMoLangParser("frotatex", Integer.valueOf(0)); this.m = createMoLangParser("frotatey", Integer.valueOf(0)); this.l = createMoLangParser("frotatez", Integer.valueOf(0)); this.t = createMoLangParser("fx", Integer.valueOf(0)); this.d = createMoLangParser("fy", Integer.valueOf(0)); this.z = new CopyOnWriteArrayList<>(); this.z.addAll((Collection)createMoLangParserList("tip")); this.q = new ConcurrentHashMap<>(); ConfigurationSection configurationSection1 = configurationSection.contains("actions") ? configurationSection : this.aa; if (configurationSection1.isConfigurationSection("actions")) { ConfigurationSection configurationSection2 = configurationSection1.getConfigurationSection("actions"); for (String str : configurationSection2.getKeys(false))
/*     */         this.q.put(str, new ll(vh1.parseExpression(configurationSection2.get(str)), this));  } else if (configurationSection1.isString("actions")) { ConfigurationSection configurationSection2 = vh1.getYaml().getConfigurationSection(configurationSection1.getString("actions")); if (configurationSection2 != null)
/*     */         for (String str : configurationSection2.getKeys(false))
/*     */           this.q.put(str, new ll(vh1.parseExpression(configurationSection2.get(str)), this));   }
/*     */      for (String str : this.aa.getKeys(false))
/*     */       this.na.put(str, String.valueOf(this.aa.get(str)));  for (String str : configurationSection.getKeys(false))
/* 318 */       this.na.put(str, String.valueOf(configurationSection.get(str)));  } public void runClick(int i, int j, int k) { switch (k) {
/*     */       case 0:
/* 320 */         runAction("click_left");
/*     */         break;
/*     */       case 1:
/* 323 */         runAction("click_right");
/*     */         break;
/*     */       case 2:
/* 326 */         runAction("click_middle");
/*     */         break;
/*     */     } 
/* 329 */     runAction("click"); }
/*     */   
/*     */   public void runUnClick(int i, int j, int k) {}
/*     */   
/*     */   public void runRelease(int i, int j, int k) {
/* 334 */     switch (k) {
/*     */       case 0:
/* 336 */         runAction("release_left");
/*     */         break;
/*     */       case 1:
/* 339 */         runAction("release_right");
/*     */         break;
/*     */       case 2:
/* 342 */         runAction("release_middle");
/*     */         break;
/*     */     } 
/* 345 */     runAction("release");
/*     */   }
/*     */   
/*     */   public void runHover(int i, int j) {
/* 349 */     runAction("enter");
/*     */   }
/*     */   
/*     */   public void runLeave(int i, int j) {
/* 353 */     runAction("leave");
/*     */   }
/*     */   
/*     */   public o runAction(String str) {
/* 357 */     if (this.q.size() > 0) {
/* 358 */       bh bh1 = this.q.get(str);
/* 359 */       if (bh1 != null) {
/* 360 */         return bh1.v();
/*     */       }
/*     */     } 
/* 363 */     return ie.q;
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean keyTyped(char c, int i) throws IOException {
/* 368 */     return false;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean isHovered(int i, int j) {
/* 380 */     if (!this.sa.v()) {
/* 381 */       return false;
/*     */     }
/*     */ 
/*     */     
/* 385 */     if (this.k.v() != 0.0D && this.o.v() != 0.0D && 
/* 386 */       !sk.v(i, j, getLimitXPos(), getLimitYPos(), this.k.v(), this.o.v())) {
/* 387 */       return false;
/*     */     }
/*     */ 
/*     */     
/* 391 */     return sk.v(i, j, getXPos() + this.c, getYPos() + this.r, this.p.v() * this.ia.v(), this.n.v() * this.ia.v());
/*     */   }
/*     */   
/*     */   public double getXPos() {
/* 395 */     String str = this.ha.v();
/*     */ 
/*     */ 
/*     */     
/* 399 */     if (!str.isEmpty()) {
/* 400 */       if (str.equals("3") || str.equals("6") || str.equals("9"))
/*     */       {
/* 402 */         return this.e.v() + this.ta.field_146294_l; } 
/* 403 */       if (str.equals("2") || str.equals("5") || str.equals("8"))
/*     */       {
/* 405 */         return (this.ta.field_146294_l / 2.0F) + this.e.v(); } 
/* 406 */       if (str.startsWith("1_") || str.startsWith("4_") || str.startsWith("7_")) {
/* 407 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 408 */         if (pi1 != null)
/* 409 */           return this.e.v() + pi1.getXPos(); 
/* 410 */       } else if (str.startsWith("3_") || str.startsWith("6_") || str.startsWith("9_")) {
/* 411 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 412 */         if (pi1 != null)
/* 413 */           return this.e.v() + pi1.getXPos() + pi1.getWidth(); 
/* 414 */       } else if (str.startsWith("2_") || str.startsWith("5_") || str.startsWith("8_")) {
/* 415 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 416 */         if (pi1 != null)
/* 417 */           return this.e.v() + pi1.getXPos() + pi1.getWidth() / 2.0D; 
/*     */       } 
/*     */     } 
/* 420 */     return this.e.v();
/*     */   }
/*     */   
/*     */   public double getYPos() {
/* 424 */     String str = this.ha.v();
/*     */ 
/*     */ 
/*     */     
/* 428 */     if (!str.isEmpty()) {
/* 429 */       if (str.equals("7") || str.equals("8") || str.equals("9"))
/*     */       {
/* 431 */         return this.x.v() + this.ta.field_146295_m; } 
/* 432 */       if (str.equals("4") || str.equals("5") || str.equals("6"))
/*     */       {
/* 434 */         return (this.ta.field_146295_m / 2.0F) + this.x.v(); } 
/* 435 */       if (str.startsWith("1_") || str.startsWith("2_") || str.startsWith("3_")) {
/* 436 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 437 */         if (pi1 != null)
/* 438 */           return this.x.v() + pi1.getYPos(); 
/* 439 */       } else if (str.startsWith("7_") || str.startsWith("8_") || str.startsWith("9_")) {
/* 440 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 441 */         if (pi1 != null)
/* 442 */           return this.x.v() + pi1.getYPos() + pi1.getHeight(); 
/* 443 */       } else if (str.startsWith("4_") || str.startsWith("5_") || str.startsWith("6_")) {
/* 444 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 445 */         if (pi1 != null)
/* 446 */           return this.x.v() + pi1.getYPos() + pi1.getHeight() / 2.0D; 
/*     */       } 
/*     */     } 
/* 449 */     return this.x.v();
/*     */   }
/*     */   
/*     */   public double getLimitXPos() {
/* 453 */     String str = this.ha.v();
/*     */ 
/*     */ 
/*     */     
/* 457 */     if (!str.isEmpty()) {
/* 458 */       if (str.equals("3") || str.equals("6") || str.equals("9"))
/*     */       {
/* 460 */         return this.b.v() + this.ta.field_146294_l; } 
/* 461 */       if (str.equals("2") || str.equals("5") || str.equals("8"))
/*     */       {
/* 463 */         return (this.ta.field_146294_l / 2.0F) + this.b.v(); } 
/* 464 */       if (str.startsWith("1_") || str.startsWith("4_") || str.startsWith("7_")) {
/* 465 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 466 */         if (pi1 != null)
/* 467 */           return this.b.v() + pi1.getXPos(); 
/* 468 */       } else if (str.startsWith("3_") || str.startsWith("6_") || str.startsWith("9_")) {
/* 469 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 470 */         if (pi1 != null)
/* 471 */           return this.b.v() + pi1.getXPos() + pi1.getWidth(); 
/* 472 */       } else if (str.startsWith("2_") || str.startsWith("5_") || str.startsWith("8_")) {
/* 473 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 474 */         if (pi1 != null)
/* 475 */           return this.b.v() + pi1.getXPos() + pi1.getWidth() / 2.0D; 
/*     */       } 
/*     */     } 
/* 478 */     return this.b.v();
/*     */   }
/*     */   
/*     */   public double getLimitYPos() {
/* 482 */     String str = this.ha.v();
/*     */ 
/*     */ 
/*     */     
/* 486 */     if (!str.isEmpty()) {
/* 487 */       if (str.equals("7") || str.equals("8") || str.equals("9"))
/*     */       {
/* 489 */         return this.v.v() + this.ta.field_146295_m; } 
/* 490 */       if (str.equals("4") || str.equals("5") || str.equals("6"))
/*     */       {
/* 492 */         return (this.ta.field_146295_m / 2.0F) + this.v.v(); } 
/* 493 */       if (str.startsWith("1_") || str.startsWith("2_") || str.startsWith("3_")) {
/* 494 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 495 */         if (pi1 != null)
/* 496 */           return this.v.v() + pi1.getYPos(); 
/* 497 */       } else if (str.startsWith("7_") || str.startsWith("8_") || str.startsWith("9_")) {
/* 498 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 499 */         if (pi1 != null)
/* 500 */           return this.v.v() + pi1.getYPos() + pi1.getHeight(); 
/* 501 */       } else if (str.startsWith("4_") || str.startsWith("5_") || str.startsWith("6_")) {
/* 502 */         pi pi1 = this.ta.findComponent(str.substring(2));
/* 503 */         if (pi1 != null)
/* 504 */           return this.v.v() + pi1.getYPos() + pi1.getHeight() / 2.0D; 
/*     */       } 
/*     */     } 
/* 507 */     return this.v.v();
/*     */   }
/*     */   
/*     */   public double getWidth() {
/* 511 */     return this.p.v() * this.ia.v();
/*     */   }
/*     */   
/*     */   public double getHeight() {
/* 515 */     return this.n.v() * this.ia.v();
/*     */   }
/*     */ 
/*     */   
/*     */   public void cache(int i, int j) {
/* 520 */     if (this.g.containsKey(Integer.valueOf(0))) {
/* 521 */       this.c = (i - ((Point)this.g.get(Integer.valueOf(0))).x);
/* 522 */       this.r = (j - ((Point)this.g.get(Integer.valueOf(0))).y);
/*     */     } 
/* 524 */     this.c = sk.v(this.c, this.j.v(), this.h.v());
/* 525 */     this.r = sk.v(this.r, this.u.v(), this.y.v());
/*     */     
/* 527 */     this.oa.z();
/* 528 */     this.sa.z();
/* 529 */     this.ua.z();
/* 530 */     this.ia.z();
/* 531 */     this.ha.z();
/* 532 */     this.e.z();
/* 533 */     this.x.z();
/* 534 */     this.a.z();
/* 535 */     this.p.z();
/* 536 */     this.p.z();
/* 537 */     this.n.z();
/* 538 */     this.b.z();
/* 539 */     this.v.z();
/* 540 */     this.k.z();
/* 541 */     this.o.z();
/* 542 */     this.h.z();
/* 543 */     this.y.z();
/* 544 */     this.j.z();
/* 545 */     this.u.z();
/* 546 */     this.f.z();
/* 547 */     this.s.z();
/* 548 */     this.m.z();
/* 549 */     this.l.z();
/* 550 */     this.t.z();
/* 551 */     this.d.z();
/*     */     
/* 553 */     for (bh bh1 : this.z)
/* 554 */       bh1.z(); 
/*     */   }
/*     */   public void setValue(String str, Object object) {
/*     */     double d1;
/*     */     double d2;
/* 559 */     if (str.startsWith("actions.")) {
/* 560 */       this.q.put(str.substring(8), toMolangParser(object));
/*     */       
/*     */       return;
/*     */     } 
/* 564 */     switch (str.toLowerCase(Locale.ROOT)) {
/*     */       case "x":
/* 566 */         this.e = toMolangParser(object);
/*     */         return;
/*     */       case "y":
/* 569 */         this.x = toMolangParser(object);
/*     */         return;
/*     */       case "z":
/* 572 */         this.a = toMolangParser(object);
/*     */         return;
/*     */       case "width":
/* 575 */         this.p = toMolangParser(object);
/*     */         return;
/*     */       case "height":
/* 578 */         this.n = toMolangParser(object);
/*     */         return;
/*     */       case "limitx":
/* 581 */         this.b = toMolangParser(object);
/*     */         return;
/*     */       case "limity":
/* 584 */         this.v = toMolangParser(object);
/*     */         return;
/*     */       case "limitwidth":
/* 587 */         this.k = toMolangParser(object);
/*     */         return;
/*     */       case "limitheight":
/* 590 */         this.o = toMolangParser(object);
/*     */         return;
/*     */       case "maxdistancex":
/* 593 */         this.h = toMolangParser(object);
/*     */         return;
/*     */       case "maxdistancey":
/* 596 */         this.y = toMolangParser(object);
/*     */         return;
/*     */       case "mindistancex":
/* 599 */         this.j = toMolangParser(object);
/*     */         return;
/*     */       case "mindistancey":
/* 602 */         this.u = toMolangParser(object);
/*     */         return;
/*     */       case "distancex":
/* 605 */         this.c = toMolangParser(object).z();
/*     */         return;
/*     */       case "distancey":
/* 608 */         this.r = toMolangParser(object).z();
/*     */         return;
/*     */       case "dx":
/* 611 */         d1 = toMolangParser(object).z();
/* 612 */         this.c = this.h.z() * d1;
/*     */         return;
/*     */       case "dy":
/* 615 */         d2 = toMolangParser(object).z();
/* 616 */         this.r = this.y.z() * d2;
/*     */         return;
/*     */       case "visible":
/* 619 */         this.sa = toMolangParser(object);
/*     */         return;
/*     */       case "enable":
/* 622 */         this.oa = toMolangParser(object);
/*     */         return;
/*     */       case "alpha":
/* 625 */         this.ua = toMolangParser(object);
/*     */         return;
/*     */       case "scale":
/* 628 */         this.ia = toMolangParser(object);
/*     */         return;
/*     */       case "tip":
/* 631 */         this.z.clear();
/* 632 */         if (object instanceof String) {
/* 633 */           String[] arrayOfString = ((String)object).split("\\\\n");
/* 634 */           this.z.addAll((Collection<? extends bh>)Arrays.<String>stream(arrayOfString).map(this::toMolangParser).collect(Collectors.toList()));
/*     */         } else {
/* 636 */           this.z.addAll((Collection<? extends bh>)((List)object).stream().map(bh1 -> new ll(bh1, this)).collect(Collectors.toList()));
/*     */         } 
/*     */         return;
/*     */       case "fscale":
/* 640 */         this.f = toMolangParser(object);
/*     */         return;
/*     */       case "frotatex":
/* 643 */         this.s = toMolangParser(object);
/*     */         return;
/*     */       case "frotatey":
/* 646 */         this.m = toMolangParser(object);
/*     */         return;
/*     */       case "frotatez":
/* 649 */         this.l = toMolangParser(object);
/*     */         return;
/*     */       case "fx":
/* 652 */         this.t = toMolangParser(object);
/*     */         return;
/*     */       case "fy":
/* 655 */         this.d = toMolangParser(object);
/*     */         return;
/*     */     } 
/* 658 */     if (object instanceof String) {
/* 659 */       this.na.put(str.toLowerCase(Locale.ROOT), (String)object);
/*     */     }
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public Object getValue(String str) {
/* 666 */     switch (str.toLowerCase(Locale.ROOT)) {
/*     */       case "rendertime":
/* 668 */         return String.valueOf(this.ea);
/*     */       case "rendertimeper":
/* 670 */         return String.valueOf(this.ea / this.ta.i);
/*     */       case "name_":
/*     */       case "name":
/* 673 */         return this.xa.getName();
/*     */       
/*     */       case "hover_":
/*     */       case "hover":
/* 677 */         return isHovered(sk.w, sk.q) ? "1" : "0";
/*     */       case "x":
/* 679 */         return this.e.z();
/*     */       case "y":
/* 681 */         return this.x.z();
/*     */       case "width":
/* 683 */         return this.p.z();
/*     */       case "height":
/* 685 */         return this.n.z();
/*     */       case "limitx":
/* 687 */         return this.b.z();
/*     */       case "limity":
/* 689 */         return this.v.z();
/*     */       case "limitwidth":
/* 691 */         return this.k.z();
/*     */       case "limitheight":
/* 693 */         return this.o.z();
/*     */       case "maxdistancex":
/* 695 */         return this.h.z();
/*     */       case "maxdistancey":
/* 697 */         return this.y.z();
/*     */       case "mindistancex":
/* 699 */         return this.j.z();
/*     */       case "mindistancey":
/* 701 */         return this.u.z();
/*     */       case "distancex_":
/*     */       case "distancex":
/* 704 */         return String.valueOf(this.c);
/*     */       case "distancey_":
/*     */       case "distancey":
/* 707 */         return String.valueOf(this.r);
/*     */       case "dx_":
/*     */       case "dx":
/* 710 */         return String.valueOf(this.c / this.h.z());
/*     */       case "dy_":
/*     */       case "dy":
/* 713 */         return String.valueOf(this.r / this.y.z());
/*     */       case "visible":
/* 715 */         return this.sa.z() ? "1" : "0";
/*     */       case "enable":
/* 717 */         return this.oa.z() ? "1" : "0";
/*     */       case "alpha":
/* 719 */         return Double.toString(sk.v(this.ua.z(), 0.0D, 1.0D));
/*     */       case "scale":
/* 721 */         return this.ia.z();
/*     */       case "tip":
/* 723 */         return new nf(getTipStringTexts(), false);
/*     */       case "fscale":
/* 725 */         return this.f.z();
/*     */       case "frotatex":
/* 727 */         return this.s.z();
/*     */       case "frotatey":
/* 729 */         return this.m.z();
/*     */       case "frotatez":
/* 731 */         return this.l.z();
/*     */       case "fx":
/* 733 */         return this.t.z();
/*     */       case "fy":
/* 735 */         return this.d.z();
/*     */ 
/*     */       
/*     */       case "x_":
/* 739 */         return this.e.h();
/*     */       case "y_":
/* 741 */         return this.x.h();
/*     */       case "width_":
/* 743 */         return this.p.h();
/*     */       case "height_":
/* 745 */         return this.n.h();
/*     */       case "limitx_":
/* 747 */         return this.b.h();
/*     */       case "limity_":
/* 749 */         return this.v.h();
/*     */       case "limitwidth_":
/* 751 */         return this.k.h();
/*     */       case "limitheight_":
/* 753 */         return this.o.h();
/*     */       case "maxdistancex_":
/* 755 */         return this.h.h();
/*     */       case "maxdistancey_":
/* 757 */         return this.y.h();
/*     */       case "mindistancex_":
/* 759 */         return this.j.h();
/*     */       case "mindistancey_":
/* 761 */         return this.u.h();
/*     */       
/*     */       case "visible_":
/* 764 */         return this.sa.h();
/*     */       case "enable_":
/* 766 */         return this.oa.h();
/*     */       case "alpha_":
/* 768 */         return this.ua.h();
/*     */       case "scale_":
/* 770 */         return this.ia.h();
/*     */       case "tip_":
/* 772 */         return new nf((Collection)this.z.stream().map(bh::h).collect(Collectors.toList()), false);
/*     */       
/*     */       case "fscale_":
/* 775 */         return this.f.h();
/*     */       case "frotatex_":
/* 777 */         return this.s.h();
/*     */       case "frotatey_":
/* 779 */         return this.m.h();
/*     */       case "frotatez_":
/* 781 */         return this.l.h();
/*     */       case "fx_":
/* 783 */         return this.t.h();
/*     */       case "fy_":
/* 785 */         return this.d.h();
/*     */     } 
/*     */ 
/*     */     
/* 789 */     return this.na.getOrDefault(str.toLowerCase(Locale.ROOT), "");
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public List<String> getTipStringTexts() {
/* 795 */     List<String> list = (List)v().stream().map(o::z).collect(Collectors.toList());
/* 796 */     list.replaceAll(a -> a.replace("&", "§"));
/* 797 */     return list;
/*     */   }
/*     */   
/*     */   public void close() {}
/*     */   
/*     */   public abstract void render(int paramInt1, int paramInt2);
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\pi.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */